package com.itlong.cloud.app.resource;

import com.itlong.cloud.POJO.PO.AppPublishInfoPO;
import com.itlong.cloud.app.service.IAppPublishInfoService;
import com.itlong.cloud.noncore.app.IAppAppPublishInfoServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 *<desc>
 *     新版APP的项目信息接口代理实现类
 *</desc>
 *
 * @createDate 2017/10/10
 */
@RestController
public class AppPublishInfoReource implements IAppAppPublishInfoServiceClient{
    @Autowired
    IAppPublishInfoService iAppPublishInfoService;

    /**
     * <desc>
     *     APP端_首页版块,获取最新版本的发布日志
     * </desc>
     * @param appType 类型,android/ios/iossdk/androidsdk/androidengineer
     * @param appSort 类别 test/official
     * @return
     * @author cuiduanwu
     * @createDate 2017/10/10
     */
    @Override
    @RequestMapping(path = "/home/versionUpdate",method = RequestMethod.POST)
    public AppPublishInfoPO getLatestAppPublishInfo(@RequestParam("appType") String appType,@RequestParam("appSort") String appSort,@RequestParam("appLanguage") String appLanguage) throws  Exception{
        return  iAppPublishInfoService.getLatestAppPublishInfo(appType,appSort,appLanguage);
    }


}
